//
//  UIBarButtonItem+Extention.h
//  CZXApp
//
//  Created by muxue on 2018/10/11.
//

#import <UIKit/UIKit.h>

typedef void(^XBBarButtonAction)(void);

@interface UIBarButtonItem (Extention)
@property (nonatomic, copy) XBBarButtonAction myAction;

+ (instancetype)itemWithImage:(UIImage *)image
                       action:(XBBarButtonAction)action;
+ (instancetype)itemWithTitle:(NSString *)title
                       action:(XBBarButtonAction)action;

+ (instancetype)buttonWithImage:(UIImage *)image
                         action:(XBBarButtonAction)action;
+ (instancetype)buttonWithTitle:(NSString *)title
                         action:(XBBarButtonAction)action;
@end
